home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / misc / URLClassPath$2.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.1 KB  |  54 lines

  1. package sun.misc;
  2.  
  3. import java.util.Enumeration;
  4. import java.util.NoSuchElementException;
  5.  
  6. final class URLClassPath$2 implements Enumeration {
  7.    private int index;
  8.    private Resource res;
  9.    // $FF: synthetic field
  10.    final String val$name;
  11.    // $FF: synthetic field
  12.    final boolean val$check;
  13.    // $FF: synthetic field
  14.    final URLClassPath this$0;
  15.  
  16.    URLClassPath$2(URLClassPath var1, String var2, boolean var3) {
  17.       this.this$0 = var1;
  18.       this.val$name = var2;
  19.       this.val$check = var3;
  20.       this.index = 0;
  21.       this.res = null;
  22.    }
  23.  
  24.    private boolean next() {
  25.       if (this.res != null) {
  26.          return true;
  27.       } else {
  28.          URLClassPath.Loader var1;
  29.          while((var1 = URLClassPath.access$000(this.this$0, this.index++)) != null) {
  30.             this.res = var1.getResource(this.val$name, this.val$check);
  31.             if (this.res != null) {
  32.                return true;
  33.             }
  34.          }
  35.  
  36.          return false;
  37.       }
  38.    }
  39.  
  40.    public boolean hasMoreElements() {
  41.       return this.next();
  42.    }
  43.  
  44.    public Object nextElement() {
  45.       if (!this.next()) {
  46.          throw new NoSuchElementException();
  47.       } else {
  48.          Resource var1 = this.res;
  49.          this.res = null;
  50.          return var1;
  51.       }
  52.    }
  53. }
  54.